import request from '@/utils/request'

export function queryEventTouchsData(mission) {
  return request({
    url: `getEventTouchs/${mission}`,
    method: 'get',
    // params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}

/*  thrombolysisOrder  治疗*/
export function queryFindChipsData(itemType, dispatchId, data) {
  return request({
    url: `findchipsByInstance/${itemType}/mission/${dispatchId}`,
    method: 'get',
    params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}
/* conservative 保守治疗 */
export function queryFindChipsConservativeData(dispatchId, data) {
  return request({
    url: `findchipsByInstance/conservative/mission/${dispatchId}`,
    method: 'get',
    params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}
/* giveup 放弃治疗 */
export function queryFindChipsGiveupData(dispatchId, data) {
  return request({
    url: `findchipsByInstance/giveup/mission/${dispatchId}`,
    method: 'get',
    params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}

export function querySurgeriesData(mission) {
  return request({
    url: `loadsurgeries/${mission}`,
    method: 'get',
    // params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}
// 初步诊断
export function findDiagnosesClcs(data) {
  return request({
    url: `findDiagnosesClcs`,
    method: 'get',
    params: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}

//获取绕行CUU 
export function getDispatchData(data) {
  return request({
    url: '/dispatch/getDispatchData',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}

//保存绕行CUU
export function modifyDispatchData(data) {
  return request({
    url: '/dispatch/modifyDispatchData',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}


//保存冠脉造影
export function saveCag(data) {
  return request({
    url: '/saveCag',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}

export function saveCure(data) {
  return request({
    url: '/saveCure',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}

export function querysaveTreatmentData(data) {
  return request({
    url: 'saveCure',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}
